<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>    
<%@ include file="/include/jsp/baseContent.jsp"%>    
<%
//when select a tab, then coloring the tab.
String lectureTab = request.getParameter("lectureTab");
if(lectureTab == null){
	lectureTab = "01";
}

String j_goalLv = request.getParameter("lectureTabDTO.japanese_point");
String e_goalLv = request.getParameter("lectureTabDTO.english_point");
String major1_goalLv = request.getParameter("lectureTabDTO.major_point_1");
String major2_goalLv = request.getParameter("lectureTabDTO.major_point_2");
String major3_goalLv = request.getParameter("lectureTabDTO.major_point_3");
String major4_goalLv = request.getParameter("lectureTabDTO.major_point_4");
%>  
<link type="text/css" href="css/calendar/ui.all.css" rel="stylesheet" />
<link type="text/css" href="css/calendar/demos.css" rel="stylesheet" />
<script type="text/javascript">
var selectedLecture = "01";
function viewSelectedLecture(lectureTab, classify_code, type){
	
	if(lectureTab == null || lectureTab == ""){
		lectureTab = "01";
	}
	
	for(var i=1; i<7; i++ ){
		document.getElementById("tab0"+i).style.background = "#ffffff";
		document.getElementById("body0"+i).style.display = "none";
	}

	document.getElementById("body"+lectureTab).style.display = "block";
	document.getElementById("tab"+lectureTab).style.background = "#44cedd";		
	selectedLecture = lectureTab;
	
	if(classify_code == null || classify_code == ""){
		classify_code = "15";
	}
	
	if(type == null || type == ""){
		type = "S";
	}	
}

function registLecture(){

	var pt_a = document.getElementById("pt_a").innerHTML;
	var pt_e = document.getElementById("pt_e").innerHTML;
	var pt_i = document.getElementById("pt_i").innerHTML;
	var pt_o = document.getElementById("pt_o").innerHTML;
	var pt_u = document.getElementById("pt_u").innerHTML;
	var pt_all = document.getElementById("pt_all").innerHTML;
	var pt_g = document.getElementById("pt_g").innerHTML;
	var pt_non = document.getElementById("pt_non").innerHTML;
	var pt_sub = document.getElementById("pt_sub").innerHTML;
	var pt_main = document.getElementById("pt_main").innerHTML;
	var pt_total = document.getElementById("pt_total").innerHTML;
	
	frmObj = document.frm; 	
	frmObj.action = "/edu/registLecture.action?pt_a="+pt_a+"&pt_e="+pt_e+"&pt_i="+pt_i+"&pt_o="+pt_o+"&pt_u="+pt_u+"&pt_all="+pt_all+"&pt_g="+pt_g+"&pt_non="+pt_non+"&pt_sub="+pt_sub+"&pt_main="+pt_main+"&pt_total="+pt_total;
	frmObj.submit();
}
</script>
<div style="margin:auto; text-align:center;">
	<!--// 컨텐츠 영역 -->
	<div id="mainContainer">
	<!-- //##### Contents START ############################# -->		
		<div id="title" style="text-align:left; padding-left:5px;">
			<h3>Recommended lecture list by <%=session.getAttribute("user_id")%></h3>
			<hr size="1" width="90%" style="color:#dfdfdf;" >
		</div>
		<div style="width:90%; height:485px;">
		<form id="frm" name="frm" method="post" >	
			<table style="border:2px solid #ffffff; width:100%;">
			<tr height="25px">
				<td id="tab01" style="width:14%;background:#44cedd"
					onclick="viewSelectedLecture('01', '15');">
					Japanese
				</td>
				<td id="tab02" style="width:14%;" 
					onclick="viewSelectedLecture('02', '16');">
					English
				</td>
				<td id="tab03" style="width:14%;" 
					onclick="viewSelectedLecture('03', '<s:property value="lectureTabDTO.major_code_1"/>','M');">
					<s:property value="lectureTabDTO.major_name_1"/>
				</td>
				<td id="tab04" style="width:14%;" 
					onclick="viewSelectedLecture('04', '<s:property value="lectureTabDTO.major_code_2"/>');">
					<s:property value="lectureTabDTO.major_name_2"/>
				</td>
				<td id="tab05" style="width:14%;" 
					onclick="viewSelectedLecture('05', '<s:property value="lectureTabDTO.major_code_3"/>');">
					<s:property value="lectureTabDTO.major_name_3"/>
				</td>
				<td id="tab06" style="width:14%;" 
					onclick="viewSelectedLecture('06', '<s:property value="lectureTabDTO.major_code_4"/>');">
					<s:property value="lectureTabDTO.major_name_4"/>
				</td>
				<td width="*">&nbsp;</td> 
			</tr>
			</table>
			<div id="body01" style="margin:auto; text-align:center;">
				<iframe name="hiddenframe1" src="/edu/selecTabRecommendInfo.action?lectureTab=01&classify_code=15&type=S&goalLv=<s:property value="lectureTabDTO.japanese_point"/>" frameborder="0" style="width:100%; height:560px; overflow:hidden"></iframe>
			</div>
			<div id="body02" style="margin:auto; text-align:center; display:none;">
				<iframe name="hiddenframe2" src="/edu/selecTabRecommendInfo.action?lectureTab=02&classify_code=16&type=S&goalLv=<s:property value="lectureTabDTO.english_point"/>" frameborder="0" style="width:100%; height:560px; overflow:hidden"></iframe>
			</div>
			<div id="body03" style="margin:auto; text-align:center; display:none;">
				<iframe name="hiddenframe3" src="/edu/selecTabRecommendInfo.action?lectureTab=03&classify_code=<s:property value="lectureTabDTO.major_code_1"/>&type=M&goalLv=<s:property value="lectureTabDTO.major_point_1"/>" frameborder="0" style="width:100%; height:560px; overflow:hidden"></iframe>
			</div>
			<div id="body04" style="margin:auto; text-align:center; display:none;">
				<iframe name="hiddenframe4" src="/edu/selecTabRecommendInfo.action?lectureTab=04&classify_code=<s:property value="lectureTabDTO.major_code_2"/>&type=S&goalLv=<s:property value="lectureTabDTO.major_point_2"/>" frameborder="0" style="width:100%; height:560px; overflow:hidden"></iframe>
			</div>
			<div id="body05" style="margin:auto; text-align:center; display:none;">
				<iframe name="hiddenframe5" src="/edu/selecTabRecommendInfo.action?lectureTab=05&classify_code=<s:property value="lectureTabDTO.major_code_3"/>&type=S&goalLv=<s:property value="lectureTabDTO.major_point_3"/>" frameborder="0" style="width:100%; height:560px; overflow:hidden"></iframe>
			</div>
			<div id="body06" style="margin:auto; text-align:center; display:none;">
				<iframe name="hiddenframe6" src="/edu/selecTabRecommendInfo.action?lectureTab=06&classify_code=<s:property value="lectureTabDTO.major_code_4"/>&type=S&goalLv=<s:property value="lectureTabDTO.major_point_4"/>" frameborder="0" style="width:100%; height:560px; overflow:hidden"></iframe>
			</div>

			<table border="1" style="border:2px solid #000; width:90%;">
			<colgroup>
					<col width="30%">
					<col width="20%">
					<col width="30%">
					<col width="20%">
				</colgroup>
			<tr height="20px">
				<td>Area 'ア'</td>
				<td><span id="pt_a">0</span></td>
				<td>Area 'ALL'</td>
				<td><span id="pt_all">0</span></td>
			</tr>
			<tr height="20px">
				<td>Area 'イ'</td>
				<td><span id="pt_i">0</span></td>
				<td>'G'eneral</td>
				<td><span id="pt_g">0</span></td>
			</tr>
			<tr height="20px">
				<td>Area 'ウ'</td>
				<td><span id="pt_u">0</span></td>
				<td>Non-credit</td>
				<td><span id="pt_non">0</span> ea.</td>
			</tr>
			<tr height="20px">
				<td>Area 'エ'</td>
				<td><span id="pt_e">0</span></td>
				<td>Sub-theme</td>
				<td><span id="pt_sub">0</span></td>
			</tr>
			<tr height="20px">
				<td>Area 'オ'</td>
				<td><span id="pt_o">0</span></td>
				<td>Main-theme</td>
				<td><span id="pt_main">0</span></td>
			</tr>
			<tr height="25px" style="background:#a4ad12">
				<td colspan="2">Total</td>
				<td colspan="2"><span id="pt_total">0</span></td>
			</tr>
			</table>
			<br>
			<input type="hidden" id="j_code" name="j_code" value="15" />
			<input type="hidden" id="e_code" name="e_code" value="16" />
			<input type="hidden" id="m1_code" name="m1_code" value="<s:property value="lectureTabDTO.major_code_1"/>" />
			<input type="hidden" id="m2_code" name="m2_code" value="<s:property value="lectureTabDTO.major_code_2"/>" />
			<input type="hidden" id="m3_code" name="m3_code" value="<s:property value="lectureTabDTO.major_code_3"/>" />
			<input type="hidden" id="m4_code" name="m4_code" value="<s:property value="lectureTabDTO.major_code_4"/>" />
			<input type="hidden" id="j_lvl_8" name="j_lvl_8" value="" /><input type="hidden" id="j_lvl_7" name="j_lvl_7" value="" />
			<input type="hidden" id="j_lvl_6" name="j_lvl_6" value="" /><input type="hidden" id="j_lvl_5" name="j_lvl_5" value="" />
			<input type="hidden" id="j_lvl_4" name="j_lvl_4" value="" /><input type="hidden" id="j_lvl_3" name="j_lvl_3" value="" />
			<input type="hidden" id="j_lvl_2" name="j_lvl_2" value="" /><input type="hidden" id="j_lvl_1" name="j_lvl_1" value="" />
			<input type="hidden" id="e_lvl_8" name="e_lvl_8" value="" /><input type="hidden" id="e_lvl_7" name="e_lvl_7" value="" />
			<input type="hidden" id="e_lvl_6" name="e_lvl_6" value="" /><input type="hidden" id="e_lvl_5" name="e_lvl_5" value="" />
			<input type="hidden" id="e_lvl_4" name="e_lvl_4" value="" /><input type="hidden" id="e_lvl_3" name="e_lvl_3" value="" />
			<input type="hidden" id="e_lvl_2" name="e_lvl_2" value="" /><input type="hidden" id="e_lvl_1" name="e_lvl_1"value=""  />
			<input type="hidden" id="m1_lvl_8" name="m1_lvl_8" value="" /><input type="hidden" id="m1_lvl_7" name="m1_lvl_7" value="" />
			<input type="hidden" id="m1_lvl_6" name="m1_lvl_6" value="" /><input type="hidden" id="m1_lvl_5" name="m1_lvl_5" value="" />
			<input type="hidden" id="m1_lvl_4" name="m1_lvl_4" value="" /><input type="hidden" id="m1_lvl_3" name="m1_lvl_3" value="" />
			<input type="hidden" id="m1_lvl_2" name="m1_lvl_2" value="" /><input type="hidden" id="m1_lvl_1" name="m1_lvl_1" value="" />
			<input type="hidden" id="m2_lvl_8" name="m2_lvl_8" value="" /><input type="hidden" id="m2_lvl_7" name="m2_lvl_7" value="" />
			<input type="hidden" id="m2_lvl_6" name="m2_lvl_6" value="" /><input type="hidden" id="m2_lvl_5" name="m2_lvl_5" value="" />
			<input type="hidden" id="m2_lvl_4" name="m2_lvl_4" value="" /><input type="hidden" id="m2_lvl_3" name="m2_lvl_3" value="" />
			<input type="hidden" id="m2_lvl_2" name="m2_lvl_2" value="" /><input type="hidden" id="m2_lvl_1" name="m2_lvl_1" value="" />
			<input type="hidden" id="m3_lvl_8" name="m3_lvl_8" value="" /><input type="hidden" id="m3_lvl_7" name="m3_lvl_7" value="" />
			<input type="hidden" id="m3_lvl_6" name="m3_lvl_6" value="" /><input type="hidden" id="m3_lvl_5" name="m3_lvl_5" value="" />
			<input type="hidden" id="m3_lvl_4" name="m3_lvl_4" value="" /><input type="hidden" id="m3_lvl_3" name="m3_lvl_3" value="" />
			<input type="hidden" id="m3_lvl_2" name="m3_lvl_2" value="" /><input type="hidden" id="m3_lvl_1" name="m3_lvl_1" value="" />
			<input type="hidden" id="m4_lvl_8" name="m4_lvl_8" value="" /><input type="hidden" id="m4_lvl_7" name="m4_lvl_7" value="" />
			<input type="hidden" id="m4_lvl_6" name="m4_lvl_6" value="" /><input type="hidden" id="m4_lvl_5" name="m4_lvl_5" value="" />
			<input type="hidden" id="m4_lvl_4" name="m4_lvl_4" value="" /><input type="hidden" id="m4_lvl_3" name="m4_lvl_3" value="" />
			<input type="hidden" id="m4_lvl_2" name="m4_lvl_2" value="" /><input type="hidden" id="m4_lvl_1" name="m4_lvl_1" value="" />
			<input type="button" value="Submit" onclick="registLecture();" />
		</form>			
		</div>
	<!-- //##### Contents END ############################# -->
	</div>
	<!--// 컨텐츠 영역 -->
</div>				
